00001 <?php 00002 /*--------------------------------------------------------------------------+ 00003 This file is part of eStudy. 00004 messaging/classes/class.messaging_view.inc.php 00005 - Modulgruppe: Messaging 00006 - Beschreibung: Abstrakte Basisklasse für alle Views 00007 - Version: 0.2, 21.01.2009 00008 - Autor(en): 00009 Alexander Rausch <alexander.rausch@mni.fh-giessen.de> [Refactoring WS 08/09], 00010 Waldemar Krampetz <waldemar.krampetz@mni.fh-giessen.de>, 00011 Dennis Bayer <dennis.bayer@mni.fh-giessen.de><bayer.d@gmx.de> 00012 +---------------------------------------------------------------------------+ 00013 This program is free software; you can redistribute it and/or 00014 modify it under the terms of the GNU General Public License 00015 as published by the Free Software Foundation; either version 2 00016 of the License, or any later version. 00017 +---------------------------------------------------------------------------+ 00018 This program is distributed in the hope that it will be useful, 00019 but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 GNU General Public License for more details. 00022 You should have received a copy of the GNU General Public License 00023 along with this program; if not, write to the Free Software 00024 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00025 +--------------------------------------------------------------------------*/ 00036 abstract class MessagingView { 00041 protected $messaging; 00042 00047 protected $db; 00048 00056 protected $execution; 00057 00062 protected $translate; 00063 00068 protected $locale; 00069 00075 protected $zendDate; 00076 00081 public function __construct($messaging) { 00082 $this->execution = true; 00083 00084 $this->messaging = $messaging; 00085 00086 $this->locale = getLocale(); 00087 00088 $this->zendDate = new Zend_Date($this->locale); 00089 00090 $this->translate = getTranslate("messaging"); 00091 00092 /* DB Access holen */ 00093 $this->db = $messaging->getDB(); 00094 00095 /* Aktionen abfangen */ 00096 $this->execution = $this->checkActions(); 00097 00098 if($this->execution) { 00099 /* View initalisieren */ 00100 $this->execution = $this->initView(); 00101 } 00102 } 00103 00109 protected function initView() { 00110 return true; 00111 } 00112 00117 protected function checkActions() { 00118 return true; 00119 } 00120 00127 public function runExecution() { 00128 return $this->execution; 00129 } 00130 } 00131 ?>
1.6.1